package com.ruoyi.event.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.annotation.UserDrugInfo;
import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;

import java.util.Date;


/**
 * 违规报告视图对象 event_wgbg
 *
 * @author strongme
 * @date 2023-02-04
 */
@Data
@ExcelIgnoreUnannotated
public class EventWgbgVo implements EventInfo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long wgbgId;

    /**
     * 违规人员id
     */
    @ExcelProperty(value = "违规人员id")
    private Long userId;

    @UserDrugInfo
    public Object getUserInfo() {
        return userId;
    }

    /**
     * 公安机关
     */
    @ExcelProperty(value = "公安机关")
    private String gajg;

    /**
     * 违规行为
     */
    @ExcelProperty(value = "违规行为", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "wgxw")
    private String wgxw;

    /**
     * 违规日期
     */
    @ExcelProperty(value = "违规日期")
    private Date wgrq;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 附件
     */
    @ExcelProperty(value = "附件")
    private String fj;


    @Override
    public Long getId() {
        return wgbgId;
    }

    @Override
    public String getText() {
        return wgxw;
    }

    @Override
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getTime() {
        return wgrq;
    }
}
